package com.gjy.design.decorator.s1;

/**
 * @author gjy
 * @version 1.0
 * @since 2025-11-10 10:11:38
 */
public class Condiments {

    private Condiments() {
    }

    public static Coffee withMilk(Coffee c) {
        return new CoffeeDecorator(c) {
            @Override
            public double cost() {
                return super.cost() + 0.50;
            }

            @Override
            public String getDescription() {
                return super.getDescription() + " + Milk";
            }
        };
    }

    public static Coffee withMocha(Coffee c) {
        return new CoffeeDecorator(c) {
            @Override
            public double cost() {
                return super.cost() + 0.80;
            }

            @Override
            public String getDescription() {
                return super.getDescription() + " + Mocha";
            }
        };
    }

    public static Coffee withWhip(Coffee c) {
        return new CoffeeDecorator(c) {
            @Override
            public double cost() {
                return super.cost() + 0.60;
            }

            @Override
            public String getDescription() {
                return super.getDescription() + " + Whip";
            }
        };
    }

}
